package com.my.input;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

/**
 * @author marshal
 * @version 2021-05-21
 */
public class FileReaderTest {
    public static void main(String[] args) throws IOException {
        var fr = new FileReader("file/poem.txt");
        var cbuf = new char[32];
        var hasRead = 0;
        while ((hasRead = fr.read(cbuf)) > 0) {
            System.out.println(new String(cbuf, 0, hasRead));
        }
    }
}
